<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="jquery.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div>
			<p>性别：
				<label for=""><input type="radio" name="gender" value="男">男</label>
				<label for=""><input type="radio" name="gender" value="女">女</label>
			</p>
			<p>最喜欢的水果：
				<label for=""><input type="checkbox">apple</label>
				<label for=""><input type="checkbox">watermalon</label>
				<label for=""><input type="checkbox">peach</label>
			</p>
			<button type="button">点击弹出性别</button>
		</div>
	</body>
	<script type="text/javascript">
		$("input:checkbox").attr("checked",true);
		$('button').click(function(){
			alert($("input:checked").val());
		})
	</script>
</html>
